package com.haois.mp.database.module.wxserver.dao;

import com.haois.mp.database.module.common.daomain.TempData;
import com.haois.mp.database.module.common.daomain.TempMessage;
import me.chanjar.weixin.mp.bean.message.WxMpXmlMessage;
import me.chanjar.weixin.mp.bean.message.WxMpXmlOutMessage;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * Created by RuiHaoZ on 2018/3/1 15:31
 */
@Component
public interface BaseMessageMapper {

    /**
     * @param tempMessage
     */
    void addMsgRecord(@Param("tmsg") TempMessage tempMessage);

    /**
     * @param tempData
     * @param id
     * @param type
     */
    void saveTempInfo(@Param("tempData") TempData tempData, @Param("id") String id, @Param("type") String type);

    /**
     * @param id
     * @return
     */
    Map<String, Object> getTempInfo(@Param("id") String id);

    /**
     * @param id
     * @return
     */
    Map<String, Object> get(@Param("id") Integer id);


    void saveInMsg(@Param("wxMp") WxMpXmlMessage wxMpXmlMessage, @Param("xml") String xml);

    void saveOutMsg(@Param("wxMp") WxMpXmlOutMessage wxMpXmlMessage, @Param("xml") String xml, @Param("msgId") long msgId);


}
